home *** CD-ROM | disk | FTP | other *** search
/ Click Press Kit / Click Press Kit.iso / pc / main.dxr / Internal_102_saved1FrameCode.ls < prev    next >
Encoding:
Text File  |  2006-05-31  |  4.7 KB  |  125 lines

  1. property pLeftArrowSprite, pPageSprite, pRightArrowSprite
  2. global gMaster, gSound, gTracker
  3.  
  4. on prepareFrame me
  5.   hideFlashDialog()
  6.   hideQuitDialog()
  7.   pLeftArrowSprite = 22
  8.   pPageSprite = 23
  9.   pRightArrowSprite = 24
  10. end
  11.  
  12. on enterFrame me
  13.   gMaster.pmarker = the frameLabel
  14.   gTracker.mAddSection(gMaster.pmarker)
  15.   sendAllSprites(#mSetUpGraphics)
  16. end
  17.  
  18. on exitFrame me
  19.   cursor(-1)
  20.   gSound.mResumeSound()
  21.   gMaster.pmarker = the frameLabel
  22.   gMaster.pSavedCount = value(gMaster.pmarker.char[5])
  23.   if gMaster.pSummaryList[gMaster.pSummaryList.count].pPage > 1 then
  24.     sprite(pLeftArrowSprite).visible = 1
  25.     sprite(pPageSprite).visible = 1
  26.     sprite(pRightArrowSprite).visible = 1
  27.     if gMaster.pSavedCount = 0 then
  28.       gMaster.pSavedCount = 1
  29.     end if
  30.     vSavedCount = gMaster.pSummaryList[gMaster.pSummaryList.count].pPage
  31.     vText = "Page " & gMaster.pSavedCount & " of " & vSavedCount
  32.     member("Page", "assets").text = vText
  33.   else
  34.     sprite(pLeftArrowSprite).loc = point(-2000, -2000)
  35.     sprite(pPageSprite).visible = point(-2000, -2000)
  36.     sprite(pRightArrowSprite).visible = point(-2000, -2000)
  37.   end if
  38.   gMaster.pSavedSummaryList = []
  39.   repeat with x = 1 to gMaster.pSummaryList.count
  40.     if gMaster.pSummaryList[x].pPage = gMaster.pSavedCount then
  41.       add(gMaster.pSavedSummaryList, gMaster.pSummaryList[x])
  42.     end if
  43.   end repeat
  44.   if gMaster.pSavedSummaryList.count = 0 then
  45.     alert("the gMaster.pSavedSummaryList list is empty")
  46.     exit
  47.   else
  48.     if gMaster.pSavedSettings.xyeffect = "TRUE" then
  49.       vSpriteCount = gMaster.pPhotoSpriteStartNum
  50.       repeat with x = 1 to gMaster.pSavedSummaryList.count
  51.         sprite(vSpriteCount).member = member(gMaster.pSavedSummaryList[x].pSmallName, gMaster.pSavedSummaryList[x].pCastLibSmall)
  52.         sprite(vSpriteCount).loc = gMaster.pSavedSummaryList[x].pXYPosition
  53.         vMemberWidth = member(gMaster.pSavedSummaryList[x].pSmallName, gMaster.pSavedSummaryList[x].pCastLibSmall).width
  54.         vMemberHeight = member(gMaster.pSavedSummaryList[x].pSmallName, gMaster.pSavedSummaryList[x].pCastLibSmall).height
  55.         vWidth = vMemberWidth * float("." & gMaster.pSavedSettings.percentage)
  56.         vHeight = vMemberHeight * float("." & gMaster.pSavedSettings.percentage)
  57.         if gMaster.pSavedSettings.percentage = 100 then
  58.           sprite(vSpriteCount).width = vMemberWidth
  59.           sprite(vSpriteCount).height = vMemberHeight
  60.         else
  61.           sprite(vSpriteCount).width = vWidth
  62.           sprite(vSpriteCount).height = vHeight
  63.         end if
  64.         vSpriteCount = vSpriteCount + 1
  65.       end repeat
  66.       updateStage()
  67.     end if
  68.     if gMaster.pSavedSettings.blendeffect = "TRUE" then
  69.       vSpriteCount = gMaster.pPhotoSpriteStartNum
  70.       repeat with x = 1 to gMaster.pSavedSummaryList.count
  71.         if gMaster.pSavedSummaryList[x].pSelected = "no" then
  72.           sprite(vSpriteCount).blend = 100
  73.         else
  74.           sprite(vSpriteCount).blend = gMaster.pSavedSettings.blendpercent
  75.         end if
  76.         vSpriteCount = vSpriteCount + 1
  77.       end repeat
  78.     end if
  79.     if gMaster.pSavedSettings.rectangles = "TRUE" then
  80.       vSpriteCount = gMaster.pPhotoSpriteStartNum
  81.       vSpriteCount2 = gMaster.pRectangleSpriteStartNum
  82.       repeat with x = 1 to gMaster.pSavedSummaryList.count
  83.         if gMaster.pSavedSummaryList[x].pSelected = "no" then
  84.           sprite(vSpriteCount2).rect = rect(-2000, -2000, -1999, 1999)
  85.         else
  86.           vLeft = sprite(vSpriteCount).left - 2
  87.           vTop = sprite(vSpriteCount).top - 2
  88.           vRight = sprite(vSpriteCount).right + 2
  89.           vBottom = sprite(vSpriteCount).bottom + 2
  90.           sprite(vSpriteCount2).rect = rect(vLeft, vTop, vRight, vBottom)
  91.         end if
  92.         vSpriteCount = vSpriteCount + 1
  93.         vSpriteCount2 = vSpriteCount2 + 1
  94.       end repeat
  95.     end if
  96.     if gMaster.pSavedSettings.pushpin = "TRUE" then
  97.       vSpriteCount = gMaster.pPhotoSpriteStartNum
  98.       vSpriteCount2 = gMaster.pPushPinSpriteStartNum
  99.       repeat with x = 1 to gMaster.pSavedSummaryList.count
  100.         if gMaster.pSavedSummaryList[x].pSelected = "no" then
  101.           sprite(vSpriteCount2).loc = point(-2000, -2000)
  102.         else
  103.           vLeft = sprite(vSpriteCount).left + gMaster.pSavedSettings.pinoffset[1]
  104.           vTop = sprite(vSpriteCount).top + gMaster.pSavedSettings.pinoffset[2]
  105.           sprite(vSpriteCount2).loc = point(vLeft, vTop)
  106.         end if
  107.         vSpriteCount = vSpriteCount + 1
  108.         vSpriteCount2 = vSpriteCount2 + 1
  109.       end repeat
  110.     end if
  111.     vOK = "no"
  112.     repeat with y = 1 to gMaster.pSummaryList.count
  113.       if gMaster.pSummaryList[y].pSelected = "yes" then
  114.         vOK = "yes"
  115.         exit repeat
  116.       end if
  117.     end repeat
  118.     if vOK = "yes" then
  119.       sendSprite(9, #mSetOnStage)
  120.     else
  121.       sendSprite(9, #mSetOffStage)
  122.     end if
  123.   end if
  124. end
  125.